package client;

import dto.AccountDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import result.Result;

/**
 * @ClassName AccountClient
 * @Description 用户服务远程调用API
 * @Date 2020/12/11 11:03
 * @Author Rick Jen
 */
@FeignClient(value = "rick-account")
public interface AccountClientService {

    /**
     * 根据电话获取用户信息
     * @param phone 用户手机号
     * @return 用户信息 AccountDTO
     */
    @GetMapping("/account/loadAccountByPhone")
    Result<AccountDTO> loadAccountByPhone(@RequestParam String phone);
}
